package com.javasm.finance.dao;

import com.javasm.finance.entity.Menu;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface MenuDao {
    List<Menu> findMenu(Integer userId,Integer level) throws SQLException;
    List<Menu> findAllMenu(Integer page, Integer pageSize,String menuName,Integer parentId) throws SQLException;
    long findTotalNum(String menuName,Integer parentId) throws SQLException;
    List<Menu> findAllOneMenu() throws SQLException;
    int addMenu(Menu menu) throws SQLException;
    Menu queryByMenuId(Integer menuId) throws SQLException;
    int editMenu(Menu menu) throws SQLException;

    int deleteMenu(Integer menuId, Connection conn) throws SQLException;
    List<Menu> querySecondMenu(Integer parentId) throws SQLException;
    int deleteByParentId(Integer parentId, Connection conn) throws SQLException;
}
